/***********************************************************************
 * Module:  Client.java
 * Author:  noelLodou
 * Purpose: Defines the Class Client
 ***********************************************************************/

package modele;

import java.util.*;

/** @pdOid ab4d12b7-0fa1-4dcd-9bb4-6dffe5f7801a */
public class Client extends Personne {
   /** @pdOid 8bf61b7e-2f82-4480-959c-840e7b5c7b02 */
   private int numero;
   
   private ArrayList<Expedition> expeditions;
   
  public Client(int numero, String nom, String adresse) {
  		super(nom, adresse);
  		// TODO Auto-generated constructor stub
  		this.numero = numero;
  	}
   /** @pdOid e33c968b-2548-4dd6-a801-cce7929fe3ca */
   public void demandeFidelisation() {
      // TODO: implement
   }
   
   
   /** @pdOid a2415f41-ab05-404b-b508-4aab826a7c37 */
   public void demandeExpedition(Personne destinataire, ArrayList<Colis> c) {
      // TODO: implement
	   Expedition e = new Expedition(this, destinataire, c);
	   this.expeditions.add(e);
   }
   
   /** @pdOid c2ea1a20-3d38-4621-b084-a40a28e8f72a */
   public float annuler(Expedition e) {
      // TODO: implement
	  if (e.getEtat() == false)
	  {
		  return (e.getPrixTotal());
	  }
	  else
	  {
		  return (float) (e.getPrixTotal() * 0.9);
	  }
   }

   public List<Expedition> getExpeditions() {
	   return expeditions;
   }

   public void setExpeditions(ArrayList<Expedition> expeditions) {
	   this.expeditions = expeditions;
   }
public int getNumero() {
	return numero;
}
public void setNumero(int numero) {
	this.numero = numero;
}
   
}